From 58bebfdb790c5639d28d5e1b5fd49a3352c5fc25 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Tue, 4 Mar 2014 10:55:56 +0100 Subject: [PATCH] x86/time: avoid redundant this_cpu() this_cpu() makes use of RELOC_HIDE() to prevent unsafe optimisations, forcing a recalculation of the per-cpu data area. Don't use it needlessly. Signed-off-by: Andrew Cooper --- xen/arch/x86/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index b2c8dc7359..000191b945 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1323,7 +1323,7 @@ void init_percpu_time(void) s_time_t now; /* Initial estimate for TSC rate. */ - this_cpu(cpu_time).tsc_scale = per_cpu(cpu_time, 0).tsc_scale; + t->tsc_scale = per_cpu(cpu_time, 0).tsc_scale; local_irq_save(flags); rdtscll(t->local_tsc_stamp); -- 2.30.2